
export default {
	data() {
		return {
			xtsetting:[]
		}
	},
	onShow:function(){

	},
	onLoad() {
		let xtSettingValue = uni.getStorageSync('xtsetting')
		this.xtsetting = xtSettingValue
		console.log('系统设置')
		//console.log(this.xtsetting)
	},
	
	methods: {
		
		/* ===========================================
		 * =   以下为自己项目用到的和封装的官方的demo事件
		 * =
		 * ===========================================
		 */
		// 从本地储存中，获取用户的所有信息
		getStorageUserInfo(){
			let that = this
			uni.getStorage({
				key: 'uni_UserInfo',
				success: function (res) {
					console.log('从本地储存中，获取用户的所有信息 ↓↓↓')
					//console.log(res.data.userInfo)
					let userInfo = res.data.userInfo
					that.UserInfoData = []
					that.UserInfoData = that.UserInfoData.concat(userInfo)
					console.log(that.userInfo)
				}
			})
		},
		// 用户点击事件：如更新头像，更新昵称等
		changeUserInfo(e){
			console.log(e)
			if (e == 'setAvatar') {
				//点击了图像||更新头像
				this.setAvatar()
			} else if (e == 'setNickname') {
				//点击了昵称||更新昵称
				//带一个空昵称做传参
				this.setNickname('')
			} else if (e == 'yijianfankui'){
				uni.navigateTo({
					url:'/uni_modules/uni-feedback/pages/uni-feedback/uni-feedback'
				})
			} else if (e == 'guanyu'){
				uni.navigateTo({
					url:'/pages/ucenter/about/about'
				})
			} else if (e == 'setting'||'down'||'guankanlishi'||'userzhuiju'||'usershoucang') {
				//点击了设置
				// uni.navigateTo({
				// 	url:'/pages/ucenter/settings/settings'
				// })
				uni.showToast({
					title:'暂未开放',
					icon:'none'
				})
			} 
		},
		//登录
		isLogin(){
			//账号密码登录
			uni.navigateTo({
				//url:'/pages/TabBar/user/ucenter/login-page/pwd-login/pwd-login'
				url:'/pages/ucenter/login-page/index/index'
			})
		}
		
	}
}
	